package com.jv.spring.beanmethod;

import com.jv.spring.beanmethod.define.City;
import com.jv.spring.beanmethod.define.User;
import com.jv.spring.nestedclass.NestedConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@ComponentScan(value = "com.jv.spring.beanmethod.scan")
@PropertySource(value = "classpath:au.properties",name="my-au",encoding = "utf-8")
public class BeanMethodConfig {

	@Bean
	public City getCity(){
		return new City();
	}
	@Bean
	public User getUser(){
		return new User();
	}
}


